<h2>Danh sách khách hàng</h2>

<table class="employees" border="0">
    <tr>
        <!--<th><input type="checkbox" name="" id="checkAll" onclick="checkAll();" value="" /></th>-->
        <th>ID</th>
        <th>Full name</th>
        <th>Gender</th>
        <th>DOB</th>
        <th>Email</th>
        <th>Phone</th>
        <th>Address</th>
        <th>Action</th>
    </tr>
    <?php
    $cus = new Admin_Models_Customer();
    $rows = $this->customer;
    $url = $db->getCurrentUrl();
    $objPaging = new Libs_Paging($url, $rows, 5);
    $rows = $objPaging->getRecords();
    foreach ($rows as $cus) {
        ?>
        <tr class="emp">
            <!--<td class="cell"><input type="checkbox" name="checkOne[]" value="<?php echo $cus->getCusId(); ?>" /></td>-->
            <td class="cell"><?php echo $cus->getCusId(); ?></td>
            <td class="cell"><?php echo $cus->getLastName() . ' ' . $cus->getFirstName(); ?></td>
            <td class="cell"><?php echo $cus->getGender() == 0 ? "Nữ" : "Nam"; ?></td>
            <td class="cell"><?php echo date("d/m/Y", strtotime($cus->getDob())); ?></td>
            <td class="cell"><?php echo $cus->getEmail(); ?></td>
            <td class="cell"><?php echo $cus->getPhone(); ?></td>
            <td class="cell"><?php echo $cus->getAddress(); ?></td>
            <td class="cell"><a href="<?php echo URL_BASE . '/admin/customer/delCus/' . $cus->getCusId(); ?>" onclick="if (confirm('Bạn có chắc chắn muốn xóa không?'))
                            return true;
                        else
                            return false;">Xóa</a></td>
        </tr>
        <?php
    }
    ?>
</table>

<?php
echo $objPaging->getPaging();
?>